
<script setup>
import { onMounted, ref, watchEffect } from "vue";
import autoResize from "@/utils/autoResize";

import dvFullScreenContainer from "@/components/FullScreenContainer/index";
import dvDataHeader from "@/components/dvDataHeader";
import leftBox1 from "@/components/leftBox1/index";
import leftBox2 from "@/components/leftBox2/index";
import leftBox3 from "@/components/leftBox3/index";
import rightBox1 from "@/components/rightBox1/index";
import rightBox2 from "@/components/rightBox2/index";
import rightBox3 from "@/components/rightBox3/index";
import bottomBox1 from "@/components/bottomBox1/index";
import bottomBox2 from "@/components/bottomBox2/index";
import centerData from "@/components/centerData/index";

// const dvMain = ref(null);

// const setAppScale = () => {
//   // const currentWidth = document.body.clientWidth
//   const clientHeight = document.documentElement.clientHeight;
//   const clientWidth = document.documentElement.clientWidth;

//   const pageWidth =
//     clientWidth / clientHeight < 16 / 9 && clientWidth > 500
//       ? clientWidth
//       : (clientHeight * 16) / 9;
//   const pageHeight = (pageWidth * 9) / 16;

//   document.documentElement.style.fontSize = `${pageWidth / 100}px`;

//   console.log(pageWidth, pageHeight, dvMain.value);
//   if (dvMain.value) {
//     console.log(222);
//     dvMain.value.style.width = pageWidth + "px";
//     dvMain.value.style.height = pageHeight + "px";
//     dvMain.value.style.marginTop =
//       (document.documentElement.clientHeight - window.pageHeight) / 2 + "px";
//   }
// };
// watchEffect(() => {
//   setAppScale();
// });
// onMounted(() => {
//   window.addEventListener("resize", ()=>{
//     setAppScale()
//   });
// });
// const onResize = () => {
//   setAppScale();
// };

// const afterAutoResizeMixinInit = () => {
//   setAppScale();
// };

// autoResize(dvMain, onResize, afterAutoResizeMixinInit);
</script>
<template>
  <dv-full-screenContainer>
    <div class="dvDataScreen">
      <dv-data-header></dv-data-header>
      <div class="dvMain" ref="dvMain">
        <div class="leftColumn">
          <left-box1></left-box1>
          <left-box2></left-box2>
          <left-box3></left-box3>
        </div>
        <div class="centerColumn">
          <center-data></center-data>
          <div class="centerBottom">
            <bottom-box1></bottom-box1>
            <bottom-box2></bottom-box2>
          </div>
        </div>
        <div class="rightColumn">
          <right-box1></right-box1>
          <right-box2></right-box2>
          <right-box3></right-box3>
        </div>
      </div>
    </div>
  </dv-full-screenContainer>
</template>

<style lang="scss">
@font-face {
  font-family: "YouSheBiaoTiHei";
  src: url("@/assets/fonts/YouSheBiaoTiHei.eot");
  src: url("@/assets/fonts/YouSheBiaoTiHei.eot?#iefix")
      format("embedded-opentype"),
    url("@/assets/fonts/YouSheBiaoTiHei.woff") format("woff"),
    url("@/assets/fonts/YouSheBiaoTiHei.ttf") format("truetype"),
    url("@/assets/fonts/YouSheBiaoTiHei.svg#CustomFont") format("svg");
  font-weight: normal;
  font-style: normal;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
}
.dvDataScreen {
  background: #020824;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.dvMain {
  display: flex;
  max-height: 100%;
  padding: 25px 25px 15px;
  overflow: hidden;
  flex: 1 0 0;
  // margin:0 auto;
}

.leftColumn,
.centerColumn,
.rightColumn {
  height: 100%;
}
.leftColumn,
.rightColumn {
  flex: 22.91666vw 0 0;
  display: flex;
  flex-direction: column;
}
.centerColumn {
  display: flex;
  flex-direction: column;
  flex: 1 0 0;
  overflow: hidden;
}
.leftBox1,
.leftBox2 {
  margin-bottom: 20px;
}
.leftBox1,
.leftBox2,
.leftBox3 {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  // min-height: 200px;
}
.rightBox1,
.rightBox2 {
  margin-bottom: 20px;
}
.rightBox1,
.rightBox2,
.rightBox3 {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  // min-height: 200px;
}

.baseBorderBg {
  background-position: left top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-image: url(@/assets/img/baseBorderBg.png);
  background-color: #010d36;
}
.baseBoxHeader {
  background-position: left top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-image: url(@/assets/img/baseBorderHeaderBg.png);
  padding-left: 20px;
  font-size: 20px;
  color: #fff;
  font-weight: bolder;
  flex: auto 0 0;
  height: 36px;
  line-height: 32px;
}
.baseBoxBody {
  flex: 1 0 0;
  width: 100%;
  overflow: hidden;
}
.centerColumn {
  padding: 0 30px 0;

  .centerBottom {
    display: flex;
    margin: 0 -15px 0;
    flex: 1 0 0;
    overflow: hidden;
    padding-top: 35px;
  }

  .bottomBox1,
  .bottomBox2 {
    min-height: 300px;
    flex: 1 0 0;
    margin: 0 15px;
    display: flex;
    flex-direction: column;
  }
}
.roundbox-list {
  position: relative;
  z-index: 10;
  margin-top: 90px;
  padding-bottom: 65px;
  flex: 1 0 0;
  .bg {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    z-index: 1;
    .bg-img {
      width: 100%;
      // height: 100%;
    }
  }
  .num {
    font-family: "YouSheBiaoTiHei";
    font-size: 30px;
    font-weight: bold;
    background-image: -webkit-linear-gradient(top, #4585ec, #8cb8ff, #eee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .title {
    color: #ffffff;
    font-size: 16px;
  }
}
.roundbox-nth1-list,
.roundbox-nth2-list,
.roundbox-nth3-list {
  // display: flex;
  position: relative;
  z-index: 10;
  // justify-content: space-around;
  .item {
    // background: url(@/assets/img/data_title_bottom_bg.png) no-repeat center 80px;
    text-align: center;
    // min-width: 220px;
    z-index: 1;
  }
  .title {
    margin-right: 5px;
  }
  .num-box {
    background: url(@/assets/img/data_title_line_bg.png) no-repeat center bottom;
    padding-bottom: 4px;
  }
}
.roundbox-nth1-list .item {
  &-bottom {
    text-align: center;
  }
}

.roundbox-nth1-list .item {
  min-width: 330px;
  text-align: center;
  // background: url(@/assets/img/data_title2_bottom_bg.png) no-repeat no-repeat
  //   2px -20px;
  position: relative;
  margin-left: 0;
  left: auto;
  top: -20px;
  .item-bottom {
    margin-top: -55px;
  }
  .nth2-box {
    position: relative;
    top: -75px;
    left: 0px;
    .animate-circle {
      transform-style: preserve-3d;
      position: absolute;
      top: 50%;
      left: 50%;
      margin: -11rem 0 0 -12rem;
      width: 25rem;
      height: 30rem;
      background: url(@/assets/img/data_title2_bottom_bg.png) no-repeat center;
      background-size: contain;
      // transform: rotateX(0);
      // transform: rotateX(45deg);
      // transform: skewY(0)  rotateX(8deg) rotateY(0deg);
      // animation: circle 20s linear infinite;
    }
  }
  .num-box {
    background: none;
    margin-right: 5px;
  }
  .title {
    background: none;
  }
  .num-box {
    background: url(@/assets/img/data_title_line_bg.png) no-repeat center bottom;
    padding-bottom: 4px;
    margin-bottom: 10px;
  }
}

@keyframes rorate-demo {
  /* 0% {
    transform:  rotate(-45deg) scaleY(0.5) rotate(0);
  }
  100% {
    transform:  rotate(-45deg) scaleY(0.5) rotate(360deg);
  } */

  0% {
    transform: rotate(0) scaleY(0.5) rotate(0);

  }
  100% {
    transform: rotate(0) scaleY(0.5) rotate(360deg);

  }
}

@keyframes rorate-ball {
  0% {
    transform: rotate(0) scaleY(2) rotate(0);
  }
  100% {
    transform: rotate(-360deg) scaleY(2) rotate(0);
  }
}

.roundbox-nth2-list {
  position: relative;
  width: 950px;
  // height: 200px;
  color: #fff;
  cursor: pointer;
  // border: 2px solid #fff;
  margin: 50px auto;
  // border-radius: 50%;
  // transform: scaleY(0.25);
  // animation: rorate-demo 20s linear infinite;
  margin-top: -310px;
  display: flex;
  justify-content: space-between;
  .item {
    // position: absolute;
    // transform: scaleY(2);
    // animation: rorate-ball 20s linear infinite;
    text-align: center;
  }
  // .animate-box1 {
  //   top: 0;
  //   left: -80px;
  // }
  // .animate-box2 {
  //   top: 0;
  //   left: 750px;
  // }
}
.roundbox-nth3-list {
  position: relative;
  width: 800px;
  // height: 470px;
  color: #fff;
  cursor: pointer;
  // border: 2px solid #fff;
  margin: 50px auto;
  // border-radius: 50%;
  // transform: scaleY(0.3);
  display: flex;
  justify-content: space-between;
  // animation: rorate-demo 30s linear infinite;
  margin-top: -45px;
  .item {
    // position: absolute;
    // transform: scaleY(2);
    // animation: rorate-ball 30s linear infinite;
    text-align: center;
  }
  // .animate-box3 {
  //   top: 160px;
  //   left: 70px;
  // }
  // .animate-box4 {
  //   top: 160px;
  //   left: 610px;
  // }
}
</style>
